//package com.gxgeek.springfeaturesstudy;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.BeanFactory;
//import org.springframework.beans.factory.BeanFactoryAware;
//import org.springframework.beans.factory.BeanNameAware;
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
//import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.boot.context.event.ApplicationPreparedEvent;
//import org.springframework.boot.context.event.ApplicationStartingEvent;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.ApplicationContextAware;
//import org.springframework.context.ApplicationListener;
//import org.springframework.context.event.ContextRefreshedEvent;
//import org.springframework.context.event.EventListener;
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//
///**
// * @author gaoxing
// * @create 2017-11-07 上午9:44
// */
//@Component
//@Slf4j
//@Order(Integer.MIN_VALUE)
//public class InitBean2 implements /*ApplicationContextAware,*/BeanNameAware,BeanFactoryAware,InitializingBean,BeanFactoryPostProcessor,CommandLineRunner {
//
//    public InitBean2() {
//        log.info("InitBean2 本身构造器启动 ");
//    }
//    @Override
//    public void setBeanName(String s) {
//        log.info("InitBean2 的 BeanNameAware 的 setBeanName 方法启动");
//
//    }
//    @Override
//    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
//        log.info("InitBean2 的 BeanFactoryAware 的 setBeanFactory 方法启动");
//    }
//
//    @PostConstruct
//    public void postConstruct(){
//        log.info("InitBean2 的 @PostConstruct 注解 的 postConstruct 方法启动");
//    }
//
//    @Override
//    public void afterPropertiesSet() throws Exception {
//        log.info("InitBean2 的 InitializingBean 的 afterPropertiesSet 方法启动");
//    }
//    @Override
//    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
//        log.info("InitBean2 的 BeanFactoryPostProcessor 的 postProcessBeanFactory 方法启动");
//
//    }
//
//    @Override
//    public void run(String... args) throws Exception {
//        log.info("InitBean2 的 CommandLineRunner 的 run 方法启动");
//    }
//
//
//
//
////    @Override
////    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
////        log.info("InitBean2 的 ApplicationContextAware 的 setApplicationContext 方法启动");
////
////    }
//}
